<%@ Page Title="ADMINISTRAR AULA" Language="vb" AutoEventWireup="false" MasterPageFile="~/01ADMINISTRADOR/MPAdmin.Master" CodeBehind="admin-aula.aspx.vb" Inherits="ASI_2_UFG.admin_aula" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        function validar() {
                           alert('ingresado con exito');

                       }
                       function valida() {
                           if (document.getElementById('ctl00_ContentPlaceHolder1_txtID') == "") {
                               alert('el campo esta vacio')
                               return false;
                           }
                       
                       }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="tableform">
        <fieldset><legend>Administrar Aulas</legend></fieldset>
        <table>
        <tr>
                <td>
                    <asp:Label ID="Label6" runat="server" Text="ID"></asp:Label></td>
                <td>
                    <asp:TextBox ID="txtID" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label1" runat="server" Text="NUMERO"></asp:Label></td>
                <td>
                    <asp:TextBox ID="txtNumero" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label3" runat="server" Text="DESCRIPCION"></asp:Label></td>
                <td>
                    <asp:TextBox ID="txtdescripcion" runat="server" TextMode="MultiLine" Columns="20" Rows="2"></asp:TextBox></td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label2" runat="server" Text="ESTADO"></asp:Label></td>
                <td>
                    <asp:DropDownList ID="dropEstado" runat="server">
                        <asp:ListItem Value="a">ACTIVO</asp:ListItem>
                        <asp:ListItem Value="i">INACTIVO</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="txtCapacidad" runat="server" Text="CAPACIDAD"></asp:Label></td>
                <td>
                    <asp:TextBox ID="TXTCapacida" runat="server"></asp:TextBox>
                </td>
            </tr>
            
            <tr>
                <td colspan="2">
                    <asp:ImageButton ID="btnInsertar" runat="server" CssClass="image" 
                        ImageUrl="~/IMAGES/funct_add.png"  OnClientClick="valida();" />
                    <asp:ImageButton ID="btnModificar" runat="server" CssClass="image" 
                        ImageUrl="~/IMAGES/funct_refresh.png" />
                    <asp:ImageButton ID="btnEliminar" runat="server" CssClass="image" 
                        ImageUrl="~/IMAGES/funct_delete.png"/>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Label ID="lbMensaje" runat="server" Text=""></asp:Label>
                    <asp:Label ID="lblscript" runat="server" Text=""></asp:Label>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:SqlDataSource ID="SQLAula" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ASI2UFG %>" 
                        SelectCommand="SELECT id_aula AS ID, numero AS NUMERO, descripcion AS DESCRIPCION, estado AS ESTADO, capacidad AS CAPACIDAD FROM AULA"></asp:SqlDataSource>
                    <asp:GridView ID="GridAula" runat="server" AutoGenerateColumns="False" 
                        CellPadding="4" DataKeyNames="ID,NUMERO,DESCRIPCION,ESTADO,CAPACIDAD" 
                        DataSourceID="SQLAula" ForeColor="#333333" 
                        GridLines="None" OnPageIndexChanged="GridAula_SelectedIndexChanged">
                        <RowStyle BackColor="#EFF3FB" />
                        <Columns>
                            <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                                ReadOnly="True" SortExpression="ID" />
                            <asp:BoundField DataField="NUMERO" HeaderText="NUMERO" 
                                SortExpression="NUMERO" />
                            <asp:BoundField DataField="DESCRIPCION" HeaderText="DESCRIPCION" 
                                SortExpression="DESCRIPCION" />
                            <asp:BoundField DataField="ESTADO" HeaderText="ESTADO" 
                                SortExpression="ESTADO" />
                            <asp:BoundField DataField="CAPACIDAD" HeaderText="CAPACIDAD" 
                                SortExpression="CAPACIDAD" />
                        </Columns>
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        </div>
</asp:Content>
